#pragma once

#include <QtWidgets/QWidget>
#include "ui_manage.h"
#include <QPushButton>
#include <QStackedWidget>

class Manage : public QWidget
{
    Q_OBJECT

public:
    Manage(QWidget* parent = Q_NULLPTR);
    ~Manage();

public slots:
    void open_admin();
    void open_student();
    void return_to_main();

private:
    Ui::ManageClass* ui;
    QPushButton* closeButton;
    QPushButton* adminButton;
    QPushButton* stuButton;
    QStackedWidget* stackedWidget;
    QWidget* mainPage;
    QWidget* adminPage;
    QWidget* stuPage;
};

class AdminWindow : public QWidget {
    Q_OBJECT

public:
    AdminWindow(QWidget* parent = nullptr);
    ~AdminWindow() {}

private slots:
    void record_time_dorm_info();
    void record_checkin_student_info();
    void record_checkin_reminder();
    void update_info();
    void query_display_info();
    void delete_info();
    void query_checkin_application();

private:
    QPushButton* returnButton;
    QPushButton* recordTimeDormButton;
    QPushButton* recordCheckinStudentButton;
    QPushButton* recordCheckinReminderButton;
    QPushButton* updateInfoButton;
    QPushButton* queryDisplayInfoButton;
    QPushButton* deleteInfoButton;
    QPushButton* queryCheckinApplicationButton;
};

class StuWindow : public QWidget {
    Q_OBJECT

public:
    StuWindow(QWidget* parent = nullptr);
    ~StuWindow() {}

private slots:
    void submit_application();
    void record_checkin();
    void query_display_checkin();

private:
    QPushButton* returnButton;
    QPushButton* submitApplicationButton;
    QPushButton* recordCheckinButton;
    QPushButton* queryDisplayCheckinButton;
};